﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IBLL;
using IDAL;

namespace BLL
{
    public class Video : IBLL.IVideo
    {
        private static readonly IDAL.IVideo dal = DALFactory.DataAccess.GetVideo();

        public void InsertVideo(DataMode.video video)
        {
            dal.InsertVideo(video);
            return;
        }

        public void updateVideo(DataMode.video newVideo)
        {
            dal.updateVideo(newVideo);

            return;

        }

        public DataMode.video findVideo(int id)
        {
           return dal.findVideo(id);
        }

        public IOrderedQueryable GetAllVideos()
        {
            return dal.GetAllVideos();
        }

        public IOrderedQueryable GetVideosByAlbum(int albumID, string username)
        {
            return dal.GetVideosByAlbum(albumID,username);
        }

        public void DeleteVideo(int id)
        {
            dal.DeleteVideo(id);
        }


        public void RenameVideoByVideoID(int VideoID, string videoName)
        {
            dal.RenameVideoByVideoID(VideoID, videoName);
        }

        public IOrderedQueryable GetHotVideo()
        {
            return dal.GetHotVideo();
        }
    }
}
